# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgbase=python-ssdeep
pkgname=('python2-ssdeep' 'python-ssdeep')
_pkgname=ssdeep
pkgver=3.4
pkgrel=8
pkgdesc='Python wrapper for ssdeep fuzzy hashing library.'
arch=('x86_64' 'aarch64')
license=('LGPL3')
url='https://pypi.org/project/ssdeep/#files'
makedepends=('python2-setuptools' 'python-setuptools' 'python2-six'
             'python-six' 'python2-cffi' 'python-cffi' 'ssdeep' 'python2-pip'
             'python2-wheel' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('bcfbc145fbb467567f617883a8e0e4ce58a33db67d5c0a5193637e2506d076a3d70d371a84250290ad04844173516a6e6158624b43cd227e98edbfca330975a9')

prepare() {
  cp -a "$_pkgname-$pkgver"{,-2}
}

package_python2-ssdeep() {
  depends=('python2' 'python2-six' 'python2-cffi' 'ssdeep')

  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

package_python-ssdeep() {
  depends=('python' 'python-six' 'python-cffi' 'ssdeep')

  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

